package gui;

import javax.swing.JPanel;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.RowSpec;
import javax.swing.JEditorPane;
import com.jgoodies.forms.factories.FormFactory;
import javax.swing.JTextField;
import javax.swing.JLabel;
import javax.swing.JScrollPane;

public class NotePanel extends JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8974889499209408026L;
	public static JLabel lblTitle = new JLabel("Title");
	public static JTextField txtTitle = new JTextField();
	public static JEditorPane txtContent = new JEditorPane();

	/**
	 * Create the panel.
	 */
	public NotePanel() {
		setLayout(new FormLayout(new ColumnSpec[] {
				FormFactory.RELATED_GAP_COLSPEC,
				ColumnSpec.decode("max(75px;default)"),
				FormFactory.RELATED_GAP_COLSPEC,
				ColumnSpec.decode("max(250px;default):grow"),},
			new RowSpec[] {
				FormFactory.RELATED_GAP_ROWSPEC,
				FormFactory.DEFAULT_ROWSPEC,
				FormFactory.RELATED_GAP_ROWSPEC,
				RowSpec.decode("max(150px;default):grow"),}));
		
		
		add(lblTitle, "2, 2, right, default");
		
		
		add(txtTitle, "4, 2, fill, default");
		txtTitle.setColumns(10);
		
		JLabel lblContent = new JLabel("Content");
		add(lblContent, "2, 4, right, top");
		
		JScrollPane scrollPane = new JScrollPane();
		add(scrollPane, "4, 4, fill, fill");
		
		scrollPane.setViewportView(txtContent);
		txtContent.setContentType("text/html");

	}

}
